# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Language.V1.Model.XPSXpsOperationMetadata do
  @moduledoc """


  ## Attributes

  *   `exampleCount` (*type:* `String.t`, *default:* `nil`) - Optional. XPS server can opt to provide example count of the long running operation (e.g. training, data importing, batch prediction).
  *   `reportingMetrics` (*type:* `GoogleApi.Language.V1.Model.XPSReportingMetrics.t`, *default:* `nil`) - Metrics for the operation. By the time the operation is terminated (whether succeeded or failed) as returned from XPS, AutoML BE assumes the metrics are finalized. AutoML BE transparently posts the metrics to Chemist if it's not empty, regardless of the response content or error type. If user is supposed to be charged in case of cancellation/error, this field should be set. In the case where the type of LRO doesn't require any billing, this field should be left unset.
  *   `tablesTrainingOperationMetadata` (*type:* `GoogleApi.Language.V1.Model.XPSTablesTrainingOperationMetadata.t`, *default:* `nil`) - 
  *   `videoBatchPredictOperationMetadata` (*type:* `GoogleApi.Language.V1.Model.XPSVideoBatchPredictOperationMetadata.t`, *default:* `nil`) - 
  *   `videoTrainingOperationMetadata` (*type:* `GoogleApi.Language.V1.Model.XPSVideoTrainingOperationMetadata.t`, *default:* `nil`) - 
  *   `visionTrainingOperationMetadata` (*type:* `GoogleApi.Language.V1.Model.XPSVisionTrainingOperationMetadata.t`, *default:* `nil`) - 
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :exampleCount => String.t() | nil,
          :reportingMetrics => GoogleApi.Language.V1.Model.XPSReportingMetrics.t() | nil,
          :tablesTrainingOperationMetadata =>
            GoogleApi.Language.V1.Model.XPSTablesTrainingOperationMetadata.t() | nil,
          :videoBatchPredictOperationMetadata =>
            GoogleApi.Language.V1.Model.XPSVideoBatchPredictOperationMetadata.t() | nil,
          :videoTrainingOperationMetadata =>
            GoogleApi.Language.V1.Model.XPSVideoTrainingOperationMetadata.t() | nil,
          :visionTrainingOperationMetadata =>
            GoogleApi.Language.V1.Model.XPSVisionTrainingOperationMetadata.t() | nil
        }

  field(:exampleCount)
  field(:reportingMetrics, as: GoogleApi.Language.V1.Model.XPSReportingMetrics)

  field(:tablesTrainingOperationMetadata,
    as: GoogleApi.Language.V1.Model.XPSTablesTrainingOperationMetadata
  )

  field(:videoBatchPredictOperationMetadata,
    as: GoogleApi.Language.V1.Model.XPSVideoBatchPredictOperationMetadata
  )

  field(:videoTrainingOperationMetadata,
    as: GoogleApi.Language.V1.Model.XPSVideoTrainingOperationMetadata
  )

  field(:visionTrainingOperationMetadata,
    as: GoogleApi.Language.V1.Model.XPSVisionTrainingOperationMetadata
  )
end

defimpl Poison.Decoder, for: GoogleApi.Language.V1.Model.XPSXpsOperationMetadata do
  def decode(value, options) do
    GoogleApi.Language.V1.Model.XPSXpsOperationMetadata.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Language.V1.Model.XPSXpsOperationMetadata do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
